#ifndef RF_H
#define RF_H

#include <QtCore>
#include <QObject>

// Some definitions
#define _DEBUG_  qDebug() << "--> " << __FILE__ << ":" << __LINE__ << "(" << __PRETTY_FUNCTION__ << ") DEBUG LINE <---";

// chipwar hours
#define FIRST_CW_TIME       6
#define SECOND_CW_TIME      14
#define THIRD_CW_TIME       22

// respawn time in hours
#define HQ_PB_RESPAWN       4
#define ELVEN_PB_RESPAWN    4
#define DRACO_PB_RESPAWN    8
#define CARTELLA_PB_RESPAWN 24

// some URL definitions
#define BASE_APP_URL        "http://127.0.0.1/rfmanager/"

#define REMOTE_VERSION_FILE "rfmanager.ver"
#define REMOTE_SERVERSTART  "serverstart.rfm"

class RF : public QObject
{
    Q_OBJECT

    public:
        RF( QObject *parent = 0 );
        ~RF();

        void      setServerStart( QTime time );
        bool      checkRemoteStartTime();
        QTime     getServerStart();

        QTime     timeToHQPB();
        QTime     timeToNextCW();
        QTime     timeToElanPB();
        QTime     timeToElvenPB();
        QTime     timeToDracoPB();

    signals:
        void      kWarning( QString txt );

    private:
        QTime     serverStart;
};

#endif // RF_H
